<template>
  <div id="detail_goodsparm">
    <div class="parm">商品参数</div>
    <div class="rule">
      <div v-for="(item, index) in rule" :key="index" class="rule_item">
        <span class="span" v-for="(items, index) in item" :key="index">{{
          items
        }}</span>
      </div>
    </div>
    <div class="keyy">
      {{ keyy }}
    </div>
    <div class="set" v-for="(item, index) in set" :key="index">
      <span class="item_key">{{ item.key }}</span>
      <span class="item_value">{{ item.value }}</span>
    </div>
  </div>
</template>

<script>
export default {
  // 组件名称
  name: "detail_goodsparm", // 组件参数 接收来自父组件的数据
  props: {
    rule: {
      type: Array,
      default() {
        return [];
      },
    },
    set: {
      type: Array,
      default() {
        return [];
      },
    },
    keyy: {
      type: String,
      default() {
        return "";
      },
    },
  }, // 局部注册的组件
  components: {}, // 组件状态值
  data() {
    return {};
  },
};
</script>
<style scoped>
.rule_item {
  display: flex;
  padding: 15px 0 15px 12px;
  border-bottom: 1px solid #eee;
}
.rule_item:last-child {
  border-bottom: 4px solid #eee;
}
.span {
  flex: 25%;
}
.set {
  display: flex;
  padding: 15px 0 15px 12px;
  border-bottom: 1px solid #eee;
}
.item_key {
  width: 60px;
}
.item_value {
  color: palevioletred;
}
.keyy {
  height: 60px;
  line-height: 60px;
  padding-left: 20px;
}
.parm {
  height: 60px;
  line-height: 60px;
  padding-left: 20px;
  font-size: 16px;
  border-bottom: 2px solid #eee;
}
</style>